// 得到7天后的时间点
// 1.得到当前的时间
let now = new Date();
console.log(now.getTime());
// 2.得到7天后的时间
let after7 = new Date(now.getTime() + 7*24*60*60*1000) //7天的毫秒数
console.log(after7);
// 3.转换为标准格式
let after7Str = {
    year:after7.getFullYear(),
    month:after7.getMonth() + 1,
    day:after7.getDate(),
    hour:after7.getHours().toString().padStart(2,"0"), // 2位数，不足补零
    minute:after7.getMinutes().toString().padStart(2,"0"),
    second:after7.getSeconds().toString().padStart(2,"0"),
}
const deteStr = `${after7Str.year}-${after7Str.month}-${after7Str.hour}-${after7Str.minute}-${after7Str.second}`
console.log(deteStr);